home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / falcon / nt_dsp1.lzh / NT_DSP1.MSA / FLTS / IIR5T.ASM < prev    next >
Encoding:
Assembly Source File  |  1989-01-24  |  1.3 KB  |  42 lines

  1. ;
  2. ; This program originally available on the Motorola DSP bulletin board.
  3. ; It is provided under a DISCLAIMER OF WARRANTY available from
  4. ; Motorola DSP Operation, 6501 Wm. Cannon Drive W., Austin, Tx., 78735.
  5. ; Last Update 16 Jul 87   Version 1.0
  6. ;
  7.                                                                                                                                
  8. ; IIR5 Filter Test Program
  9. ;
  10.         opt     cex,mex
  11.         page    132,66,0,10
  12.         include 'iir5'
  13.  
  14. datin   equ     $ffff           ;location in Y memory of input file
  15. datout  equ     $fffe           ;location in Y memory of output file
  16. npts    equ     20              ;number of points to process
  17.  
  18.         org     x:0
  19. states  ds      2               ;filter states
  20.  
  21.         org     y:0
  22. coef    dc      .8/2.0,-.3/2.0,.4/2.0,-.6/2.0   ;coefficients: a1,a2,b1,b2
  23.  
  24.         org     p:$100
  25. start
  26.         move    #states,r0      ;point to filter states
  27.         move    #coef,r4        ;point to filter coefficients
  28.         move    #3,m4           ;mod 4
  29.  
  30.         do      #npts,_endp
  31.  
  32.         movep   y:datin,a       ;get sample
  33.  
  34.         iir5                    ;do biquad
  35.  
  36.         nop                     ;allow mode to change back
  37.         nop
  38.         movep   a,y:datout      ;output sample
  39. _endp
  40.         end
  41.